package com.sc.nft.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.UserCollection;
import com.sc.nft.entity.UserEcologyCollectionRecords;
import com.sc.nft.entity.vo.ecology.UserEcologyCollectionRecordsVO;
import com.sc.nft.mapper.UserEcologyCollectionRecordsMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author：LiGen
 * @Package：com.sc.nft.dao
 * @Project：sc_metago
 * @name：UserEcologyCollectionRecordsDao
 * @Date：2024/6/15 22:14
 * @Filename：UserEcologyCollectionRecordsDao
 */
@Slf4j
@Repository
public class UserEcologyCollectionRecordsDao extends ServiceImpl<UserEcologyCollectionRecordsMapper, UserEcologyCollectionRecords> {

    /**
     * 获取熔炼时用户消耗藏品记录
     *
     * @param userId
     * @param userEcologyHatchRecordsId
     * @return
     */
    public List<UserEcologyCollectionRecordsVO> getList(Long userId, Long userEcologyHatchRecordsId) {
        return baseMapper.getList(userId, userEcologyHatchRecordsId);
    }

    /**
     * 批量入库
     *
     * @param list
     * @return
     */
    public Integer saveList(List<UserEcologyCollectionRecords> list){
        return baseMapper.saveList(list);
    }
}
